<template>
  <div class="box">
    <div class="content" v-for="shows in showslistdata" :key="shows.id">
      <div class="top">
        <img :src="shows.img" />
        <div class="topc">
          <h4>{{ shows.des }}</h4>
          <p>{{ shows.num }}</p>
        </div>
        <div class="right">
          <input type="button" value="+加入" />
        </div>
      </div>
      <div class="center">
        <h1>{{ shows.title }}</h1>
      </div>
      <div class="bottom">
        <img :src="shows.img1" />
        <img :src="shows.img2" />
        <img :src="shows.img3" />
      </div>
    </div>
    <!-- <van-button type="default">默认按钮</van-button> -->
  </div>
</template>

<script>
// import axios from "axios";
export default {
  name: "Main",
  data() {
    return {
      showslist: [],
    };
  },
  // created() {
  //   axios({
  //     url: "/showslist",
  //   }).then((res) => (this.showslist = res.data));
  // },

created() {
    this.$store.dispatch("LINK_COMMAIN_DATA","/com/showslist")
    },
    computed:{
      showslistdata(){
        return this.$store.state.ComMainM.showslist
      }
   }

};
</script>

<style scoped>
.box {
  width: 100%;
  padding: 0 0.16rem;
  box-sizing: border-box;
  margin-bottom: 1rem;
}
.box .content {
  width: 100%;
  height: 2.4rem;
}

.box .content .top {
  height: 0.7rem;
}
.box .content .center {
  height: 0.46rem;
  line-height: 0.46rem;
}
.box .content .center h1 {
  font-size: 0.16rem;
  font-weight: normal;
}
.box .content .bottom {
  height: 1.24rem;
}
.box .content .bottom img {
  width: 33.3%;
  height: 1.24rem;
}
.box .top img {
  float: left;
  width: 0.58rem;
  height: 0.58rem;
  margin-top: 0.08rem;
  border-radius: 50%;
}
.box .topc {
  width: 1.4rem;
  height: 0.7rem;
  float: left;
  margin-left: 0.14rem;
}

.box .top h4 {
  font-size: 0.14rem;
  margin-top: 0.18rem;
}
.box .top p {
  font-size: 0.12rem;
  margin-top: 0.08rem;
  color: #727273;
}
.box .top .right {
  width: 0.74rem;
  height: 0.7rem;
  float: right;
  text-align: center;
  line-height: 0.7rem;
}
.box .top .right input {
  width: 0.74rem;
  height: 0.35rem;
  border: 0.01rem solid #00d3b8;
  color: #00d3b8;
  text-align: center;
  line-height: 0.35rem;
  border-radius: 0.15rem;
  font-size: 0.1rem;
}
</style>
